#include "monster.h"

Monster::Monster():m_Name("NO_NAME"), m_Energy(0), m_Position(0,0) {}

void Monster::moveTo(int x, int y)
{
    m_Position.setPosition(x, y);
}

QString Monster::toString() const
{
    return QString("monster %1 is at position (%2, %3) with energy %4").arg(m_Name).arg(m_Position.getX()).arg(m_Position.getY()).arg(m_Energy);
}

QTextStream& operator<<(QTextStream& out, const Monster &monster)
{
    out << monster.m_Name << " at (" << monster.m_Position.getX() << ", " << monster.m_Position.getY() << ")";
    return out;
}
